package provider

import (
	"context"

	"gitee.com/go-course/go12/devcloud-mini/cmdb/apps/resource"
)

type ResourceProvider interface {
	// 资源同步, 1000 ECS, Stream 接口
	// SyncRequest 请求同步的参数 Region
	// ResourceHandler 处理完一个就交给Handler一个
	Sync(context.Context, *SyncRequest, ResourceHandler) error
}

// 定义一个Handler回调钩子, 没Sync完成一个 就把结果交给下游(Hook去处理)
type ResourceHandler func(*resource.Resource)

type SyncRequest struct {
}

type SyncResponse struct {
}
